package com.byb.server.service.dto.Wc;

import com.byb.server.service.dto.WcInsuranceTypeDTO;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

public class WcProductForFontEndDTO implements Serializable {

    private Long id;

    private String name;

    private List<WcSearchProductDTO> wcSearchProductDTOList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<WcSearchProductDTO> getWcSearchProductDTOList() {
        return wcSearchProductDTOList;
    }

    public void setWcSearchProductDTOList(List<WcSearchProductDTO> wcSearchProductDTOList) {
        this.wcSearchProductDTOList = wcSearchProductDTOList;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        WcProductForFontEndDTO wcProductForFontEndDTO = (WcProductForFontEndDTO) o;
        if(wcProductForFontEndDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), wcProductForFontEndDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }
}
